package cn.ecnu.mapper.forum;

import cn.ecnu.pojo.forum.Forum;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ForumMapper {

    @Select("select * from pinke.forum where forum_id = #{id};")
    Forum getForumById(@Param("id") Integer forumId);

    @Select("select * from pinke.forum")
    List<Forum> getForumList();

    @Select("select * from pinke.forum where university_name = #{name}")
    Forum getForumByName(@Param("name") String universityName);

    int insertForum(Forum forum);

    int updateForum(Forum forum);


}